// GenericUtility.h: interface for the GenericUtility class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GENERICUTILITY_H__54D6ED98_4A20_4953_990F_301B76C6C87E__INCLUDED_)
#define AFX_GENERICUTILITY_H__54D6ED98_4A20_4953_990F_301B76C6C87E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class GenericUtility
{
protected:
	GenericUtility();
	virtual ~GenericUtility();

public:
	static std::string GetVersionInfo(HMODULE hModule, LPCTSTR lpszSubBlockName);

#pragma message("NOTE: All pointer container should use this template to free memory.")
	template <class T> static void DeletePointerContainer(std::vector<T>& vecT)
	{
		for (int i = 0;i < vecT.size();i++)
		{
			T t = vecT[i];
			delete t;
		}
		vecT.clear();
	}
};

#endif // !defined(AFX_GENERICUTILITY_H__54D6ED98_4A20_4953_990F_301B76C6C87E__INCLUDED_)
